/**
 * precedence.h is part of Gedule.
 *
 * Gedule is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Gedule is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Gedule.  If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef PRECEDENCE_H
#define PRECEDENCE_H

#include "../modelconstraint.h"
#include "../../../definitions.h"

class Precedence : public ModelConstraint
{
public:
    Precedence( const std::string & a_taskBefore, const std::string & a_taskAfter );

    virtual ~Precedence() {}

    virtual void Accept( Visitor * a_visitor, bool a_depthFirst = true );

    virtual std::string Print() const;

    const std::string & TaskBefore() const;

    const std::string & TaskAfter() const;

private:

    // Fields
    // ------

    std::string m_taskBefore;
    std::string m_taskAfter;

    static const std::string PRECEDENCE_STR;
    static const std::string TASK_STR;
    static const std::string BEFORE_STR;

    // Methods
    // -------

    // Protect default constructor.
    Precedence();

    // Protect default copy constructor.
    Precedence( const Precedence & a_other );

    // Protect default operator =.
    Precedence & operator = ( const Precedence & a_other );
};

#endif // PRECEDENCE_H
